package cn.com.cifi.mars.constant;

import org.apache.commons.lang.StringUtils;

/**
* @Description:  版本状态枚举
* @Author: wy
* @Date:
*/

public enum VersionStatusEnum {


    NOTCREATE("not_create","未编制"),
    NOTPREPARED("not_prepared","待编制"),
    ORGANIZATION("organization","编制中"),
    EXAMINEDAPPROVED("examined_approved","待提交审批"),
    APPROVED("approved","审批中"),
    FAILUREAPPROVED("failure_approved","审批已驳回"),
    SUCCESSAPPROVED("success_approved","审批通过"),
    SYSGENERATION("sys_generation","系统生成"),
    ;

    private String key;
    private String value;

    VersionStatusEnum(String key, String value) {
        this.key = key;
        this.value = value;
    }
    
    public static String getValueByKey(String key){
    	if(StringUtils.isNotBlank(key)) {
    		for(VersionStatusEnum VersionStatusEnum:VersionStatusEnum.values()){
                if(key.equals(VersionStatusEnum.getKey())){
                    return VersionStatusEnum.getValue();
                }
            }
    	}
        return  null;
    }

    /**
     * @return the key
     */
    public String getKey() {
        return key;
    }


    /**
     * @return the value
     */
    public String getValue() {
        return value;
    }


}
